namespace MvcEnrollment.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AddVituralMig : DbMigration
    {
        public override void Up()
        {
            RenameTable(name: "dbo.Courses", newName: "Course");
            RenameTable(name: "dbo.Prices", newName: "Price");
            AddForeignKey("dbo.Price", "courseID", "dbo.Course", "ID", cascadeDelete: true);
            CreateIndex("dbo.Price", "courseID");
        }
        
        public override void Down()
        {
            DropIndex("dbo.Price", new[] { "courseID" });
            DropForeignKey("dbo.Price", "courseID", "dbo.Course");
            RenameTable(name: "dbo.Price", newName: "Prices");
            RenameTable(name: "dbo.Course", newName: "Courses");
        }
    }
}
